package com.czz.manage.controller.teacher;

import com.czz.common.vo.R;
import com.czz.manage.service.CategoryService;
import com.czz.manage.vo.CategoryNestedVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName: CategoryTeacherController
 * @Author Czz
 * @Date 2020/1/20
 * @Time 10:30
 **/
@RestController
@RequestMapping(value = "/teacher/categories")
public class CategoryTeacherController {

    @Autowired
    CategoryService categoryService;

    /**
    * @Description 查询课程分类嵌套列表
    * @Param []
    * @Return com.czz.common.vo.R
    * @Author Czz
    * @Date 2020/2/23
    * @Time 16:13
    **/
    @GetMapping(value = "")
    public R getCategoryNestedList(){
        List<CategoryNestedVo> categoryNestedVoList = categoryService.getCategoryNestedList();
        return R.ok().data("items",categoryNestedVoList);
    }
}
